Vector as data structures in R